﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Step by Step Solution to Restriction Lab</h2>
    <p>To implement this request, you need to write a simple LINQ to Entities quer. Change the HomeController.CustomerInfo method to:</p>
    <pre><code>        <b>private</b> Customer CustomerInfo(string</b> customerId)
        {
            <b>return</b> (from</b> c <b>in</b> Context.Customers
                    <b>where</b> c.CustomerID == customerId
                    <b>select</b> c).Single();
        }</code></pre>
    <p>Support for the LINQ <code>Single()</code> method is new in EF 4.0. In EF 1.0 you could use <code>First()</code> as a workaround.</p>
</asp:Content>
